<template>
	<view class="recharge-item">
		<!--顶部页面按钮-->
		<view class="navbar">
			<navBar :title="'充值'"></navBar>
		</view>
		<view class="rc-head">
		    <view class="title">
		        充值金额
		    </view>
		    <view class="recharge-number">
		        <view class="number-title">充值金额</view>
		        <input type="text" placeholder="请输入或选择金额" class="input-number">
		    </view>
			<view class="recharge-type">
			    <view class="number-type">充值方式</view>
				<view class="choose-item">
					<view class="card">
						<image class="image-item" :src="nochoose" @tap="clickdom()"></image>
						<text class="card-item">银行卡</text>
					</view>
					<view class="payitem">
						<image class="image-item" :src="notchoose" @tap="Tclickdom()"></image>
						<text class="pay-item">支付宝</text>
					</view>
				</view>
			</view>
		</view>
		<view class="rc-middle">
			<view class="pay-title">
			    支付截图
			</view>
			
			<view class="pay-picture">
				<view class="left-image">
					<image class="image-item" src="../../../../static/images/mine/integral/add-image.png"></image>
					<text style="font-size:12px;color: #00000040;text-align: center;">请上传截图</text>
				</view>
				<view class="right-tips">
					温馨提示：
					<text class="text-item">
					请支付完上传截图，请勿上传虚假
					截图或付款金额不符。如操有误将
					会受到惩罚。
					</text>
				</view>
			</view>
			<!--银行卡-->
			<view class="pay-bao" v-if="active==1">
				<view class="title-name">银行卡</view>
				<view class="bao-item">
					<view class="title-item">
						<text class="name">姓名</text>
						<view class="specificname">谢先生</view>
					</view>
					<view class="title-item">
						<text class="name">银行名称</text>
						<view class="specificname">工商银行</view>
					</view>
					<view class="number-item">
						<text class="bao-name">银行卡</text>
						<view class="bao-number">5309 8010 2188 8888</view>
					</view>
					<view class="title-item">
						<text class="name">支行</text>
						<view class="specificname">莞城支行</view>
					</view>
				</view>
			</view>
			<!--支付宝-->
			<view class="pay-bao" v-if="pctive==1">
				<view class="title-name">支付宝</view>
				<view class="bao-item">
					<view class="title-item">
						<text class="name">姓名</text>
						<view class="specificname">谢先生</view>
					</view>
					<view class="number-item">
						<text class="bao-name">支付宝账号</text>
						<view class="bao-number">12547815264</view>
					</view>
				</view>
			</view>
			<view class="bottom-button">
				<view class="consent-button">
					<text class="button-item">确定</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import navBar from "@/components/NavBar.vue"
	export default {
		components:{
			navBar
		},
		data() {
			return {
				nochoose:'../../../../static/images/mine/integral/notchoose.png',
				notchoose:'../../../../static/images/mine/integral/notchoose.png',
				active:0,//为 0不显示银行卡，双击再次为0
				pctive:0,//为 0不显示支付宝，双击再次为0
			}
		},
		methods: {
			clickdom(){
				this.nochoose = "../../../../static/images/mine/integral/choose.png";
				this.active = this.active+1;
				this.notchoose='../../../../static/images/mine/integral/notchoose.png';
				this.pctive = 0;
				if(this.active==2){
					this.nochoose='../../../../static/images/mine/integral/notchoose.png';
					this.active = this.active-2;
				}
				// console.log(this.active);
			},
			Tclickdom(){
				this.notchoose = "../../../../static/images/mine/integral/choose.png";
				this.pctive = this.pctive+1;
				this.nochoose='../../../../static/images/mine/integral/notchoose.png';
				this.active = 0;
				if(this.pctive==2){
					this.notchoose='../../../../static/images/mine/integral/notchoose.png';
					this.pctive = this.pctive-2;
				}
				// console.log(this.pctive);
			}
		}
	}
</script>

<style lang="scss">
	
.recharge-item{
	
	.rc-head{
		padding: 0 10px;
		.title {
		    font-weight: bold;
			font-size: 17px;
			text-align:left;
			line-height: 30rpx;
		}
		.recharge-number{
			display: flex;
			justify-content:space-between;
			padding: 12px 15px;
			border: 1px solid rgba(112, 112, 112, 0.2);
			border-radius: 5px 5px 5px 5px;
			margin-top: 12px;
			.number-title{
				line-height: 40rpx;
			}
			.input-number{
				text-align: right;
				line-height: 30rpx;
			}
		}
		.recharge-type{
			display: flex;
			justify-content:space-between;
			padding: 12px 15px;
			border: 1px solid rgba(112, 112, 112, 0.2);
			border-radius: 5px 5px 5px 5px;
			margin-top: 12px;
			.number-type{
				line-height: 40rpx;
			}
			.choose-item{
				display: flex;
				justify-content: space-between;
				.card{
					display:flex;
					justify-content: space-between;
					margin-right: 16px;
					.image-item{
						width:13px;
						height:13px;
						margin-top: 2px;
					}
					.card-item{
						font-size:12px;
						margin-left: 3px;
					}
				}
				.payitem{
					display: flex;
					justify-content: space-between;
					.image-item{
						width:13px;
						height:13px;
						margin-top: 2px;
					}
					.pay-item{
						font-size: 12px;
						margin-left: 3px;
					}
				}
			}
		}
	}
	.rc-middle{
		margin-top: 10px;
		padding: 0 10px;
		.pay-title{
			font-size:17px;
			font-weight: bold;
		}
		.pay-picture{
			display:flex;
			padding: 10px 10px;
			border-radius: 10px 10px 10px 10px;
			opacity: 0.83;
			border: 1px solid #E4E4E4;
			margin-top: 20px;
			.left-image{
				width: 110px;
				height:110px;
				display: block;
				text-align: center;
				background: #E4E4E440;
				border-radius: 2px 2px 2px 2px;
				.image-item{
					display: block;
					width:30px;
					height:30px;
					margin:28px 38px 0 38px;
				}
			}
			.right-tips{
				font-size:12px;
				color:#F71D1F;
				width: 55%;
				margin-left: 10%;
				.text-item{
					display: block;
				}
			}
		}
		.pay-bao{
			display: block;
			margin-top: 20px;
			.title-name{
				color: #000000;
				font-size:17px;
				font-weight: bold;
			}
			.bao-item{
				display: block;
				.title-item{
					display: flex;
					justify-content: space-between;
					padding:10px 10px;
					border-radius: 10px 10px 10px 10px;
					opacity: 0.83;
					border: 1px solid #E4E4E4;
					margin-top: 15px;
					.name{
						font-size:14px;
						text-align: left;
					}
					.specificname{
						font-size:14px;
						text-align: right;
					}
				}
				.number-item{
					display: flex;
					justify-content: space-between;
					padding:10px 10px;
					border-radius: 10px 10px 10px 10px;
					opacity: 0.83;
					border: 1px solid #E4E4E4;
					margin-top: 15px;
					.bao-name{
						font-size:14px;
						text-align: left;
					}
					.bao-number{
						font-size:14px;
						text-align: right;
					}
				}
			}
		}
		.bottom-button{
			text-align:center;
			margin-top:40px;
			.consent-button{
				width:90%;
				height:50px;
				background-color: #F71D1F50;
				margin: 0 4%;
				border-radius: 10px 10px 10px 10px;
				.button-item{
					display: block;
					font-size: 18px;
					opacity: 0.6;
					line-height:50px;
					color: #FFFFFF;
				}
			}
		}
	}
}
</style>
